home *** CD-ROM | disk | FTP | other *** search
- package asp.wizard;
-
- import asp.util.ResourceUtil;
- import asp.wizard.util.UiUtil;
- import com.sun.java.swing.ButtonGroup;
- import com.sun.java.swing.JPanel;
- import com.sun.java.swing.JRadioButton;
- import com.sun.java.swing.JScrollPane;
- import com.sun.java.swing.JTextArea;
- import java.awt.Color;
- import java.awt.Component;
- import java.awt.Container;
- import java.awt.Font;
- import java.awt.GridBagConstraints;
- import java.awt.GridBagLayout;
-
- public class WVPanelIntro extends WVPanelBase {
- public static final String ID_RDB_LIST = "radiobutton.list";
- public static final String ID_RDB_DETAIL = "radiobutton.detail";
- private static final String ID_TXA_LIST = "label.list";
- private static final String ID_TXA_DETAIL = "label.detail";
- private static final int WIDTH_EXPLANATION = 30;
- private static final Color RDB_COLOR = new Color(102, 102, 153);
- private static final Font RDB_FONT = new Font("Dialog", 1, 11);
- public static final String ERR_MISSING_COMPONENT = "err.msg.cantstart_missingcomponent";
- public static final String ID_IMG_PAGEIMAGE = "image.pageimage";
- JRadioButton _rdbList;
- JRadioButton _rdbDetail;
- ButtonGroup _btgTemplates;
- JTextArea _txaExplainList;
- JScrollPane _scpExplainList;
- JTextArea _txaExplainDetail;
- JScrollPane _scpExplainDetail;
-
- public WVPanelIntro() {
- }
-
- public WVPanelIntro(boolean showImage) {
- super(showImage);
- }
-
- protected void initComponents() {
- super.initComponents();
- ResourceUtil ru = ((WVPanelBase)this).getResourceUtil();
- JPanel contentPanel = ((WVPanelBase)this).getContentPanel();
- Color bgcolor = ((Component)contentPanel).getBackground();
- this._rdbList = new JRadioButton(ru.getString("radiobutton.list"));
- this._rdbList.setActionCommand("radiobutton.list");
- this._rdbList.setForeground(RDB_COLOR);
- this._rdbList.setFont(RDB_FONT);
- this._rdbDetail = new JRadioButton(ru.getString("radiobutton.detail"));
- this._rdbDetail.setActionCommand("radiobutton.detail");
- this._rdbDetail.setForeground(RDB_COLOR);
- this._rdbDetail.setFont(RDB_FONT);
- this._btgTemplates = new ButtonGroup();
- this._btgTemplates.add(this._rdbList);
- this._btgTemplates.add(this._rdbDetail);
- this._btgTemplates.setSelected(this._rdbList.getModel(), true);
- this._txaExplainList = new JTextArea();
- this._scpExplainList = UiUtil.setupTextAreaAsMultilineLabel(this._txaExplainList, bgcolor, 30, ru.getString("label.list"));
- this._txaExplainDetail = new JTextArea();
- this._scpExplainDetail = UiUtil.setupTextAreaAsMultilineLabel(this._txaExplainDetail, bgcolor, 30, ru.getString("label.detail"));
- }
-
- protected void initLayout() {
- super.initLayout();
- JPanel contentPanel = ((WVPanelBase)this).getContentPanel();
- GridBagLayout gbl = new GridBagLayout();
- GridBagConstraints gbc = new GridBagConstraints();
- ((Container)contentPanel).setLayout(gbl);
- gbc.ipady = 5;
- UiUtil.addComponent(contentPanel, super._txpIntro, gbl, gbc, 0, 0, 1, 1, (double)1.0F, (double)0.0F, 18, 2, 0, 0, 10, 0);
- gbc.ipadx = 0;
- UiUtil.addComponent(contentPanel, this._rdbList, gbl, gbc, 0, 1, 1, 1, (double)1.0F, (double)0.0F, 18, 2, 0, 0, 0, 0);
- UiUtil.addComponent(contentPanel, this._scpExplainList, gbl, gbc, 0, 2, 1, 1, (double)1.0F, (double)0.0F, 18, 1, 0, 0, 0, 0);
- UiUtil.addComponent(contentPanel, this._rdbDetail, gbl, gbc, 0, 3, 1, 1, (double)1.0F, (double)0.0F, 18, 2, 5, 0, 0, 0);
- UiUtil.addComponent(contentPanel, this._scpExplainDetail, gbl, gbc, 0, 4, 1, 1, (double)1.0F, (double)1.0F, 18, 1, 0, 0, 0, 0);
- }
- }
-